package com.y.singletonl;

/**
 * 线程不安全单例
 * @author Administrator
 *
 */
public class SafeEmperor {

	private static SafeEmperor emperor;
	
	private SafeEmperor() {
		
	}
	
	public static SafeEmperor getInstance() {
		if(emperor == null) {
			emperor = new SafeEmperor();
		} 
		return emperor;
	}
	
	public void sayName() {
		System.out.println("我是叶少宁");
	}
	
}
